package com.msh.frame.common.util;

import java.io.PrintWriter;
import java.io.StringWriter;

public class ExceptionUtil {

  /**
   * 收集异常堆栈信息
   */
  public static String collectExceptionStackMsg(Throwable t) {
    StringWriter sw = new StringWriter();
    t.printStackTrace(new PrintWriter(sw, true));
    String strs = sw.toString();
    return strs;
  }
}
